import request from '@/utils/request'
// 获取所有频道
export const getAllChannels = () => {
    return request({
        url: '/v1_0/channels',
        method: 'get'
    })
}
// 在线状态，存储至数据库
export const addUserChannel = (channel) => {
    return request({
        method: 'PATCH',
        url: '/v1_0/user/channels',
        data: {
            channels: [channel]
        }
    })
}

// 在线状态，删除频道
export const deleteUserChannel = (channelId) => {
    return request({
        method: 'DELETE',
        url: `/v1_0/user/channels/${channelId}`,

    })
}